def minus(a,b):
    a=list(map(lambda x:int(x),("0"+str(a).strip())))
    b=list(map(lambda x:int(x),("0"+str(b).strip())))
    if len(a)>len(b):
        for x in range(len(a)-len(b)):
            b.insert(0,0)
    else:
        for x in range(len(b)-len(a)):
            a.insert(0,0)
    for i in range(len(a)-1,0,-1):
        if(a[i]>=b[i]):
            a[i]-=b[i]
        else:
            a[i]=a[i]+10-b[i]
            a[i-1]-=1
    return a
a=input()
b=input()
print(minus(a,b))